#ifndef IMAGERECEIVER_H
#define IMAGERECEIVER_H
#include <QApplication>
#include <QUdpSocket>
#include <QImage>
#include <QBuffer>
#include <QDataStream>

class ImageReceiver : public QObject
{
    Q_OBJECT

public:
    ImageReceiver();
    ImageReceiver(quint16 port);

private slots:
    void processPendingDatagrams();

private:
    QUdpSocket *udpSocket;
    QByteArray buffer;
    int totalBytes;
    int receivedBytes;
    int reciveFlag;
};
#endif // IMAGERECEIVER_H
